<%@ page contentType="text/html; charset=utf-8" language="java"%>
<%@ page import="com.erp.hibernate.beans.Employee"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=gb2312"/>
		<title>ERP进销存管理系统</title>
		<link href="main.css" rel="stylesheet" type="text/css"/>
		<script>
        function check(){
           if (confirm("您确定修改订单吗？")){
              if (document.getElementById("subscriber").value==""){
                  alert("订购单位不能为空！");
                  return false;
              }
              if (document.getElementById("link").value==""){
                  alert("联系方式不能为空！");
                  return false;
              }                      
              if (document.getElementById("quantity").value==""||!/^[1-9]\d*$/.test(document.getElementById("quantity").value)){
                alert("请输入正确的销售数量！");
              	  return false;               
         	  }
           }
        }
        </script>
	</head>
	<body>
	    <form action="saleorderform!saveedit.do" name="form" method="post">
		<table class="tableborder" cellspacing=1 cellpadding=4 width="100%" height="100%" align="center">
			<tr>
			   <td colspan="4" class="header">销售订单修改  </td>
			</tr>
			<colgroup align="left">
				<col class="altbg1" width="25%"/>							
				<col class="altbg2" width="25%"/>
				<col class="altbg1" width="25%"/>
				<col class="altbg2" width="25%"/>
			</colgroup>
			<tr>
				<td>物品编号：</td>
				<td><span><s:property value="saleorderform.goodsid"/></span></td>			
				<td>物品名称：</td>
				<td><span><s:property value="saleorderform.goodsname"/></span></td>
			</tr>
			<tr>
				<td>牌号：</td>
				<td><span><s:property value="saleorderform.trademark"/></span></td>
				<td>规格：</td>
				<td><span><s:property value="saleorderform.spec"/></span></td>
			</tr>
			<tr>
				<td>订购单位：</td>
				<td><input id="subscriber" type="text" name="saleorderform.subscriber" value="<s:property value="saleorderform.subscriber"/>" /></td>
				<td>联系方式：</td>
				<td><input id="link" type="text" name="saleorderform.link" value="<s:property value="saleorderform.link"/>" /></td>
			</tr>	
			<tr>
				<td>编制人：</td>
				<td><span><%=((Employee)session.getAttribute("employee")).getName()%></span></td>
				<td>修改日期：</td>
				<td><span><%=new java.sql.Date(System.currentTimeMillis())%></span></td>
			</tr>					
			<tr>
				<td>销售数量：</td>
				<td colspan="3"><input id="quantity" type="text" name="saleorderform.quantity" value="<s:property value="saleorderform.quantity"/>"/></td>
			</tr>
			<tr>
				<td colspan="4" bgcolor="d6e0ef" align="center">
					<input type="submit" value="修改" onclick="return check();"/>
				</td>
			</tr>
		</table>
		</form>
	</body>
</html>
